package com.example.backupgeo.intercepto;

import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 拦截器
 */
public class LoginInterceptor implements HandlerInterceptor {

//    在请求处理前进行调用controller方法调用之前
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        if (true) {
            System.out.println("通过");
            return true;
        } else {
            System.out.println("不通过");
            return false;
        }
    }
}
